/*
 *   This file is part of <open-parametrics>
 *   Copyright (c) 2006-2008 Miguel-Angel Sicilia
 *
 *   open-parametrics is free software: you can redistribute it and/or modify
 *   it under the terms of the Lesser GNU General Public License as
 *   published by the Free Software Foundation, either version 3 of
 *   the License, or (at your option) any later version.
 *
 *   open-parametrics is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with open-parametrics.  If not, see <http://www.gnu.org/licenses/>.
 */

package es.uah.cc.ie.parametrics;

import java.util.List;

/**
 * A dataset including information on potential cost drivers.
 *
 * @author Miguel-Angel Sicilia
 */
public abstract class Dataset {

    /**
     * The label of the Dataset.
     */
    private String  _label;

     /**
     * Constructs the Dataset definition.
     */
     public Dataset(String label){
        _label = label;
    }

    /**
     * Name of the dataset.
     */
    public String getLabel(){
        return _label;
    };

    /**
      * Gets a list of cost driver values.
      *
      * @param index The index of the instance to be converted (zero is the
      *  first index).
      * @return A list of cost driver values for the requested instance.
      */
    public abstract List<CostDriverValue> getInstance(int index);

    /**
     * Returns the number of instances.
     */
    public abstract int getSize();

    /**
     * Returns a slice of the dataset relating a cost driver with
     * an oputput variable.
     */
    public abstract double[][] getXYSlice(CostDriver x, Variable y);
}
